package io.yunho.webflux.client.service;

import io.yunho.webflux.client.annotations.ApiServer;
import io.yunho.webflux.client.domain.User;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * @author: yunho
 * @date: 2021/5/14 15:28
 * @description:
 */
@ApiServer("http://localhost:8089/ruser")
public interface IUser {
    @GetMapping("/")
    Flux<User> getAllUser();
    @GetMapping("/{id}")
    Mono<User> getUserById(@PathVariable("id") String id);
    @DeleteMapping("/{id}")
    Mono<Void> deleteUser(@PathVariable("id") String id);
    @PostMapping("/")
    Mono<User> putUser(@RequestBody Mono<User> userMono);
}
